llama_factory_output_filename = '/data/xingshiyou-slurm/codeLLM/code_llama/saves/codellama-7b/lora/predict/max_len_10000_checkpoint_11000/generated_predictions.jsonl'

import json
import sys
sys.path.append('/data/xingshiyou-slurm/codeLLM/GPT-respond')

from data_w_r import read_data, write_data


llama_factory_out = read_data(llama_factory_output_filename)

res = []

for l_f_out in llama_factory_out:
    res.append([l_f_out['predict']])

write_data(res, '/data/xingshiyou-slurm/codeLLM/data/answer/llama_factory_maxlen_10000_checkpoint_1100.json')